from flask_migrate import MigrateCommand,Migrate
from flask_script import Manager,Server
from app import create_app
from flask import redirect
from app.model import db

app=create_app()
@app.route("/")
def index():
    return redirect("index.html")

migrate=Migrate(app,db)
manager=Manager(app=app)
manager.add_command("server",Server(host='0.0.0.0'))
manager.add_command("db",MigrateCommand)


if __name__ == '__main__':
    manager.run()
